﻿package com.hh.bss.util;

public class MySQLJdbcDaoSupport extends JdbcDaoSupport{

	public String getTotalCountQuery(String query){
		StringBuffer queryPlus = new StringBuffer();
		queryPlus.append(" select count(*) from ( ");
		queryPlus.append(query);
		queryPlus.append(" )v ");
		return queryPlus.toString();
	}
	//
	public String getPaginationQuery(String query, int start, int count){
		StringBuffer queryPlus = new StringBuffer();
		queryPlus.append(" select * from ( ");
		queryPlus.append(query);
		queryPlus.append(" )v limit ").append(start).append(",").append(count);
		return queryPlus.toString();
	}

}
